package com.zjbd.douyangcommonauth.exception;


import cn.dev33.satoken.exception.NotLoginException;
import com.zjbd.douyangcommoncore.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 认证相关的全局异常拦截
 */
@RestControllerAdvice
public class AuthExceptionHandler {

    @ExceptionHandler(NotLoginException.class)
    public Result notLoginException(){
        return Result.error("请先登录");
    }



}
